import { createAxios } from './axios.js';

let url = '/aps';
// 登陆
export const userLogin = (data) => createAxios('post', url + '/user/login', data);
// 注册
export const useRegister = (data) => createAxios('post', url + '/user/register', data);
// 删除用户
export const delAdmin = (data) => createAxios('post', url + '/user/del/batch', data);
// 获取所有用户信息
export const getAllPeople = (data) => createAxios('get', url + '/user/page', data);
// 修改用户信息
export const changeAdmin = (data) => createAxios('post', url + '/front/updateInfo', data);
/*-------------首页echarts---------- */
// 获取全部用户数据
export const getAll = (data) => createAxios('get', url + '/user/page', data);

/*-------------红娘接口---------- */
// 分页获取红娘信息
export const getPeople = (data) => createAxios('get', url + '/mate/page', data);
// 添加或者修改红娘信息
export const changePeople = (data) => createAxios('post', url + '/mate', data);
// 批量删除红娘信息
export const delPeople = (data) => createAxios('post', url + '/mate/del/batch', data);

/*-------------活动接口---------- */
// 分页获取活动信息
export const getActive = (data) => createAxios('get', url + '/active/page', data);
// 添加或者修改活动信息
export const changeActive = (data) => createAxios('post', url + '/active', data);
// 批量删除活动信息
export const delActive = (data) => createAxios('post', url + '/active/del/batch', data);

/*-------------评论接口---------- */
//分页获取所有评论
export const getMsg = (data) => createAxios('get', url + '/comment', data);
// 删除评论
export const deleateMsg = (data) => createAxios('post', url + '/comment/del/batch', data);

/*-------------学堂接口---------- */
// 分页获取所有学堂内容
export const getAllStudy = (data) => createAxios('get', url + '/contents', data);
//添加学堂 或 修改学堂 
export const changeStudy = (data) => createAxios('post', url + '/contents', data);
// 批量删除学堂内容
export const deleStudy = (data) => createAxios('post', url + '/contents/del/batch', data);

/*-------------分类接口---------- */
// 分页获取所有分类
export const getFenLei = (data) => createAxios('get', url + '/classify/page', data);
// 添加或修改分类
export const changeFenlei = (data) => createAxios('post', url + '/classify', data);
// 批量删除
export const delFenlei = (data) => createAxios('post', url + '/classify/del/batch', data);

/*-------------视频接口---------- */
// 获取视频数据
export const getVideo = () => createAxios('get', url + '/video');
// 更新或修改视频
export const changeVideo = (data) => createAxios('post', url + '/video', data);
// 审核视频接口
export const checkVideo = (data) => createAxios('post', url + '/video/audit', data);
// 删除视频接口
export const delVideo = (data) => createAxios('post', url + '/video/del/batch', data);


